We have studied the J/psi suppression in 158 GeV/c Pb+Pb collisions at CERN SPS. J/psi production is assumed to be a two step process, (i) formation of c bar{c} pair, which is accurately calculable in QCD and (ii) formation of J/psi meson from the c bar{c} pair, which can be conveniently parameterized. In a pA/AA collision, as the c bar{c} pair pass through the nuclear medium, it gains relative square momentum. As a result, some of the c bar{c} pairs can gain enough momentum to cross the threshold to become open charm meson, leading to suppression in pA/AA collisions. The model without any free parameter could describe the of NA50 data on centrality dependence of the ratio's; J/psi over Drell-Yan, J/psi over minimum bias and also the Drell-Yan over minimum bias. The model was used to predict J/psi suppression at RHIC energy. At RHIC energy, hard processes may be important. With hard processes included, J/psi's are strongly suppressed, in agreement with other model calculations. We also show that centrality dependence of J/psi over minimum bias ratio can be used to determine the fraction of hard processes in the collision.